/**
 * Created by Administrator on 2016/7/18.
 */
$(document).ready(function(){
    var user_token =  sessionStorage.user_token;
    var u_id = sessionStorage.u_id;
    $.post(commonval+"/follow_list",{
        u_id:u_id,
        user_token:user_token,
        device:"wap"
    },function(data){
        if(data.status ==1){
            if(data.data!=[]){
                $("#mainPart").css("display","block");
                var docListMember = new Vue({
                    el: '#mainPart',
                    data: {
                        items: data.data
                    }
                });
            }else{
                createWindow("您还没有关注的医生");
            }
        }else{
            createWindow("获取关注列表失败");
        }
    });
    function createWindow(msg) {
        var window =$("<section class='showMsg'></section>");
        var show = "<p>"+msg+"</p>";
        window.append(show);
        $("body").append(window);
        setTimeout("$('.showMsg').remove()",5000);
    }
    //关注列表跳转
    $(".body").click(function(){
        var d_id = $(this).children(".extra").children("p").text();
        location.href="doctorInfo.html?d_id="+d_id;
    })
});
